#include <ros/ros.h>
#include <std_msgs/String.h>

int main(int argc, char *argv[])
{
    ros::init(argc, argv, "chao_node" );

    // 发布话题
    ros::NodeHandle nh;
    ros::Publisher pub = nh.advertise<std_msgs::String>("kuais_shang_che", 10); // 发送消息的对象

    ros::Rate loop_rate(10); // (可选)限制话题的发送频率为每秒10次

    while(ros::ok()){
        printf("我要刷屏了\n");
        std_msgs::String msg;
        msg.data = "guo fu ma chao, dai fei";
        pub.publish(msg);
    }
    return 0;
}
